package com.cz.video.website.service;

import com.cz.video.common.constant.CacheNames;
import com.cz.video.common.core.domain.PageQuery;
import com.cz.video.common.core.page.TableDataInfo;
import com.cz.video.website.domain.bo.WebsiteMediaTagBo;
import com.cz.video.website.domain.vo.WebsiteMediaTagVo;
import org.springframework.cache.annotation.CacheEvict;
import org.springframework.cache.annotation.Cacheable;

/**
 * <p>
 * 电影标签表 服务类
 * </p>
 *
 * @author 洪圆胜
 * @since 2023-10-15
 */
public interface IWebsiteMediaTagService{

    int addMediaTag(WebsiteMediaTagBo websiteMediaTag);

    int update(WebsiteMediaTagBo websiteMediaTag);

    @CacheEvict(cacheNames = CacheNames.WEBSITE_MOVIE, key = "#id")
    int removeById(Long id);

    @Cacheable(cacheNames = CacheNames.WEBSITE_MOVIE, key = "#id")
    WebsiteMediaTagVo getById(Long id);

    /**
     * 分页查询电影分类
     * @param websiteMediaTag
     * @param pageQuery
     * @return
     */
    TableDataInfo<WebsiteMediaTagVo> page(WebsiteMediaTagBo websiteMediaTag, PageQuery pageQuery);
}
